# cmake_minimum_required(VERSION <specify CMake version here>)
cmake_minimum_required(VERSION 3.1)
project(c_cross_platform)

set(CMAKE_CXX_STANDARD 11)

# 添加第三方的库
set(INC_DIR /usr/local/include /usr/include)
set(LINK_DIR /usr/local/lib /usr/local/lib64)

include_directories( ${INC_DIR})
link_directories(${LINK_DIR})


ADD_SUBDIRECTORY(linux/c/libevent)
ADD_SUBDIRECTORY(linux/c/cjson)
ADD_SUBDIRECTORY(linux/c/db)

# 将第三方的库链接到可执行文件
#add_executable(01_libevent_read linux/c/libevent/01read.c)
#target_link_libraries(01_libevent_read  event)
#
#add_executable(02_libevent_write linux/c/libevent/02write.c)
#target_link_libraries( 02_libevent_write event)
#
#add_executable(03_echo_server linux/c/libevent/03echoserver.c)
#target_link_libraries( 03_echo_server event)
#
#add_executable(04_server linux/c/libevent/04server.c)
#target_link_libraries( 04_server event)
#
#add_executable(05client linux/c/libevent/05client.c)
#target_link_libraries( 05client event)

#add_executable(06test_event_new linux/c/libevent/06test_event_new.c)
#target_link_libraries(06test_event_new event)
